<button>看电影喽</button>
<ul>
    <li>0001</li>
    <li>0002</li>
    <li>0003</li>
    <li>0004</li>
    <li>0005</li>
</ul>
<script type="module">
    import {get} from './ajax升级版.js'
    document.querySelector('button').onclick=function(){
        get('https://m.maizuo.com/gateway',{
            cityId:110100,
            pageNum:1,
            pageSize:10,
            type:1,
            k:1912833
        },
        (res)=>{
            console.log('成功',res);
            document.querySelector('ul').innerText = ''
                    res.data.films.forEach((item, i) => {
                        var liObj = document.createElement('li')
                        liObj.innerHTML = `
                        ${item.filmId}
                        ${item.name}
                        <img src="${item.poster}" style="width:200;margin-left:300px" />
                        `
                        document.querySelector('ul').appendChild(liObj)
                    })
        },
        'json',
        {
            'X-Client-Info': '{"a":"3000","ch":"1002","v":"5.2.0","e":"1651806328947602929483777","bc":"320100"}',
            'X-Host': 'mall.film-ticket.film.list',
            'X-Requested-With': 'XMLHttpRequest',
           'X-Token':'undefined'
        }
        )
    }
</script>